package com.bachelor.community.mapper;

import com.bachelor.community.model.entity.QuestionTagRelation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Set;

@Mapper
public interface QuestionTagMapper extends BaseMapper<QuestionTagRelation> {
    /**
     * 根据标签获取问题ID集合
     */
    @Select("select question_id from question_tag where tag_id=#{id}")
    Set<Long> selectQuestionIdsByTagId(@Param("id") Integer id);
}
